package com.qianzhou.eduUserBoot.converter;

import com.qianzhou.eduCommon.dto.UserDTO;
import com.qianzhou.eduCommon.po.User;
import com.qianzhou.eduCommon.vo.UserVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper
public interface UserConverter {
    UserConverter INSTANCE = Mappers.getMapper(UserConverter.class);

    /**
     * UserDTO转换为User
     */
    User dtoConvertPo(UserDTO dto);

    /**
     * User转换为UserVO
     */
    UserVO poConvertVo(User user);
}
